<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of sidebar_m
 *
 * @author Gidaff_01
 */
class sidebar_m extends Model {

    //put your code here
    function Sidebar_m() {
        parent::Model();
        $this->load->database();
    }

    function get_random_actualite() {
        $this->db->select();
        $this->db->from('lehu_actualite');
        $this->db->order_by('id DESC');
        $this->db->limit(1);
        $query = $this->db->get();
        return $query->result_array();
    }

    function get_card_vip() {
        $this->db->select('id,title,content,image');
        $this->db->from('seating_text');
        $this->db->where('id','CARTE FIDELITE');
        $this->db->limit(1);
        $query = $this->db->get();
        return $query->result_array();
    }
}

?>
